<?php

namespace App\Models\Trip\History;

use App\Trip\Traits\ModelDateTrait;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;

/**
 * App\Models\Trip\History\TripQueryHistory
 *
 * @property int         $id
 * @property string      $user_id 用户id
 * @property int         $trip_type 行程类型 1 火车 2 飞机 3 酒店 4 打车
 * @property string      $from_type 出发地类型 如酒店可能没有 要求出发地
 * @property string      $from_code 出发地编码
 * @property string      $to_type 目的地类型
 * @property string      $to_code 目的地编码
 * @property string      $from_name 出发地
 * @property string      $from_name_uy 出发地维语
 * @property string      $to_name 目的地
 * @property string      $to_name_uy 目的地维语
 * @property Carbon|null $created_at
 * @property Carbon|null $updated_at
 * @method static Builder|TripQueryHistory newModelQuery()
 * @method static Builder|TripQueryHistory newQuery()
 * @method static Builder|TripQueryHistory query()
 * @method static Builder|TripQueryHistory whereCreatedAt($value)
 * @method static Builder|TripQueryHistory whereFromCode($value)
 * @method static Builder|TripQueryHistory whereFromName($value)
 * @method static Builder|TripQueryHistory whereFromNameUy($value)
 * @method static Builder|TripQueryHistory whereFromType($value)
 * @method static Builder|TripQueryHistory whereId($value)
 * @method static Builder|TripQueryHistory whereToCode($value)
 * @method static Builder|TripQueryHistory whereToName($value)
 * @method static Builder|TripQueryHistory whereToNameUy($value)
 * @method static Builder|TripQueryHistory whereToType($value)
 * @method static Builder|TripQueryHistory whereTripType($value)
 * @method static Builder|TripQueryHistory whereUpdatedAt($value)
 * @method static Builder|TripQueryHistory whereUserId($value)
 * @mixin Eloquent
 */
class TripQueryHistory extends Model
{
    use HasFactory, ModelDateTrait;

    protected $table = 'trip_query_history';

    protected $fillable
        = [
            'user_id',
            'from_type',
            'to_type',
            'from_code',
            'to_code',
            'updated_at',
            'from_name',
            'from_name_uy',
            'to_name',
            'to_name_uy',
            'trip_type',
        ];
}
